package com.itlong.cloud.sdk.resource;


import com.itlong.cloud.POJO.PO.HotParamFlowRule;
import com.itlong.cloud.equip.sdk.IHotParamFlowRuleClient;
import com.itlong.cloud.sdk.service.IHotParamFlowRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class HotParamFlowRuleResource implements IHotParamFlowRuleClient {

    @Autowired
    private IHotParamFlowRuleService hotParamFlowRuleService;

    @Override
    @PostMapping(path = "sdkServer/getHotParamFlowRule")
    public  List<HotParamFlowRule> getHotParamFlowRule(@RequestBody Map<String, Object> param) {
        return hotParamFlowRuleService.getHotParamFlowRule(param);
    }


    @Override
    @PostMapping(path = "sdkServer/HotParamFlowRule/save")
    public  Integer save(@RequestBody HotParamFlowRule hotParamFlowRule) {
        return hotParamFlowRuleService.save(hotParamFlowRule);
    }

    @Override
    @PostMapping(path = "sdkServer/getFlowRuleByParam")
    public HotParamFlowRule getFlowRuleByParam(@RequestBody Map<String, Object> param) {
        return hotParamFlowRuleService.getFlowRuleByParam(param);
    }
}
